		new WOW().init();

		$().UItoTop({ easingType: 'easeOutQuart' });

		// $(".banner-image").backstretch([
		// 		'images/index/banner1.jpg',
		// 		'images/cross/15.jpg',
		// 		'images/index/banner12.jpg',
		// 		'images/index/banner13.jpg',
		// 		'images/index/banner14.jpg',
		// 		'images/index/banner15.jpg',
		// 		'images/index/banner16.jpg'
		// 	], {
		// 		fade : 1500, // 动画时长
		// 		duration : 3000 // 切换延时
		// });

					// Fixed header
		//-----------------------------------------------
		$(window).scroll(function() {
			if (($(".header.fixed").length > 0)) { 
				if(($(this).scrollTop() > 0) && ($(window).width() > 767)) {
					$("body").addClass("fixed-header-on");
				} else {
					$("body").removeClass("fixed-header-on");
				}
			};
		});

		$(window).load(function() {
			if (($(".header.fixed").length > 0)) { 
				if(($(this).scrollTop() > 0) && ($(window).width() > 767)) {
					$("body").addClass("fixed-header-on");
				} else {
					$("body").removeClass("fixed-header-on");
				}
			};
		});

		jQuery(document).ready(function($) {
			$(".scroll").click(function(event){		
				event.preventDefault();
				$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
			});
		});
		(function($){
				  $(".menu-icon").on("click", function(){
						$(this).toggleClass("open");
						$("header").toggleClass("nav-open");
						$(".menu li").toggleClass("animate");
						$('html,body').animate({scrollTop:0},0);
				  });
				  
			})(jQuery);

			var mySwiper = new Swiper('.swiper-container', {
							speed:1500,
							// effect : 'cube',
							 autoplay: {
							    delay: 3000,//1秒切换一次
							  },
							  navigation: {
							    nextEl: '.swiper-button-next',
							    prevEl: '.swiper-button-prev',
							  },
							loop : true,
							pagination: {
							    el: '.swiper-pagination',
							    clickable :true,
							 },
							on:{
						      init: function(){
						        swiperAnimateCache(this); //隐藏动画元素 
						        swiperAnimate(this); //初始化完成开始动画
						      }, 
						      slideChangeTransitionEnd: function(){ 
						        swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
						      } 
						    }
					});
				$('.swiper-container .swiper-slide').mouseenter(function () {
				   mySwiper.autoplay.stop();
				});
				$('.swiper-container .swiper-slide').mouseleave(function () {
				   mySwiper.autoplay.start();
				});

			

		 function browserRedirect(){  
          var sUserAgent = navigator.userAgent.toLowerCase();  
          var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";  
          var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";  
          var bIsMidp = sUserAgent.match(/midp/i) == "midp";  
          var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";  
          var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";  
          var bIsAndroid = sUserAgent.match(/android/i) == "android";  
          var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";  
          var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";  
	          if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {  
	                $(".wrapTitle").toggleClass("yidong");
	                $(".mobilefooter").show();
	                $(".pcfooter").hide();
	          };
	          if ( bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {  
	          		$(".swiper-container").css({
	          			"padding-top":"65px"
	          		});
	          		
	                $(".header").addClass("mobileHead");
	          }else{
	          		$(".swiper-container").css({
	          			"padding-top":"0px"
	          		});
	          		
	          		$(".header").removeClass("mobileHead");
	          };
        	}  
        	browserRedirect();

			$(".CPS_Search").click(function(){
				var CPS_Value = $(".CPS_SearchInput").val();
				if(CPS_Value==""){
					alert("请输入快递单号!")
				}else{
					window.location.href="CPS_Search.html?ord="+CPS_Value;
				}
			})

			var isSearch=true;
			 $('.CPS_go').on('touchstart',function(e) {
			 	e.preventDefault();
			 	if(isSearch){
			 		$(".CPS_search").addClass("Mobile_Active");
		      		$(".CPS_go .iconfont").addClass("MobileIcon");
		      		isSearch=!isSearch;
			 	}else{
			 		$(".CPS_search").removeClass("Mobile_Active");
		      		$(".CPS_go .iconfont").removeClass("MobileIcon");
		      		isSearch=!isSearch;

			 	}
		      	

		      });
